package com.jnzc.ocr.serv.shop.api;

import com.jnzc.ocr.common.bean.PageResult;
import com.jnzc.ocr.serv.shop.entity.ShopGoods;
import com.jnzc.ocr.serv.shop.filter.ShopGoodsFilter;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author zhangcm
 * @version 1.0, 2017-10-05
 */
@FeignClient("serv-shop")
@RequestMapping("/ShopGoodsApi")
public interface ShopGoodsApi {

    @PostMapping("/find")
    ShopGoods find(@RequestParam("id") Long id, @RequestParam("shopId") Long shopId);

    @PostMapping("/list")
    List<ShopGoods> list(@RequestBody ShopGoodsFilter filter);

    @PostMapping("/search")
    PageResult<ShopGoods> search(@RequestBody ShopGoodsFilter filter, @RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize);

    @PostMapping("/listWarn")
    List<ShopGoods> listWarn(@RequestParam("warnStockNum") Integer warnStockNum, @RequestParam("shopId") Long shopId);
}
